package demo1222.pm;
//无论是编译期异常还是运行期异常,
// 只要出现异常,不处理,都会终止当前运行程序.
public class Demo_09 {
    public static void main(String[] args) {
        try{
            get("单身");
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("程序结束...");
    }

    public static void get(String m) {
        if ("单身".equals(m)) {
            throw new NotFoundGirlFriendException("单身异常");
        }else{
            System.out.println("好好恋爱...");
        }
        System.out.println("get结束....");
    }
}
